package com.zxc.service.impl;




import com.zxc.dao.DiseasesDao;
import com.zxc.model.Diseases.DiseasesDetails;
import com.zxc.model.Diseases.DiseasesHistory;
import com.zxc.model.Diseases.DiseasesVO;
import com.zxc.service.DiseasesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;


@Service
public class DiseasesServiceImpl implements DiseasesService {
    @Autowired
    private DiseasesDao diseasesDao;

    public  List<DiseasesVO> findTreatmentByDiseasesNo(DiseasesVO diseasesVO){
        List<DiseasesVO> list = diseasesDao.findTreatmentByDiseasesNo(diseasesVO);
        return  list;
//    return  equimentDao.selectEquimentByParkId(id);
    }

    public List<DiseasesHistory> findTreatmentByDiseasesHistory(DiseasesHistory diseasesVO){
        List<DiseasesHistory> list = diseasesDao.findTreatmentByDiseasesHistory(diseasesVO);
        return  list;
    }

    public DiseasesDetails findTreatmentByDiseasesById(DiseasesVO diseasesVO){
        return  diseasesDao.selectTreatmentByDiseasesById(diseasesVO.getId());


    }
    public List<DiseasesVO> selecttreatmentbydiseases(DiseasesVO diseasesVO){
        List<DiseasesVO> list = diseasesDao.selectTreatmentByDiseases(diseasesVO);
        return  list;


    }

    public int insertTestId(DiseasesVO diseasesVO){
        for (int i = 0;i < 25; i++){
            diseasesVO.setId(UUID.randomUUID().toString().replaceAll("-", ""));
            diseasesDao.insertTestId(diseasesVO);
        }
        return 0;
    }







}
